#!/usr/bin/env python
# -*- coding:utf-8 -*-
# author:ouyang time:2023/4/11
import json
import threading
import time
import socket
from LIB.Broadcast import Broadcast
from LIB.Listen import TCPListen

"""新建实例"""
rsu_broad = Broadcast("RSU", "0001", "127.0.0.1")
rsu_broad.start()


def main_deal_task():
    print("deal test")


def main_collect_task():
    print("collect")
    # while True:
    #     time.sleep(1)
    #     car_obj = rsu_conn.get_conn_obj()
    #     print(car_obj)
    #     break


class ThreadDealMain(threading.Thread):

    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        main_deal_task()


class ThreadCollectMain(threading.Thread):

    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        main_collect_task()


deal_task = ThreadDealMain()
collect_task = ThreadCollectMain()
deal_task.start()
collect_task.start()
